<?php

function smarty_function_get_all_type($params, &$smarty) {
    //Get value from page
      //Query data
      $sql = "SELECT
      					tpy_id,
                tpy_name  
              FROM
                zk_innoforum_type";

      $column = array("tpy_id","type_name");
      $result = DBUtil::executeSQL($sql);
      $objectArray = DBUtil::marshallObjects ($result, $column);
      $smarty->assign('type_array', $objectArray); 

}